$gwx_XC_23=function(_,_v,_n,_p,_s,_wp,_wl,$gwn,$gwl,$gwh,wh,$gstack,$gwrt,gra,grb,TestTest,wfor,_ca,_da,_r,_rz,_o,_oz,_1,_1z,_2,_2z,_m,_mz,nv_getDate,nv_getRegExp,nv_console,nv_parseInt,nv_parseFloat,nv_isNaN,nv_isFinite,nv_decodeURI,nv_decodeURIComponent,nv_encodeURI,nv_encodeURIComponent,$gdc,nv_JSON,_af,_gv,_ai,_grp,_gd,_gapi,$ixc,_ic,_w,_ev,_tsd){return function(path,global){
if(typeof global==='undefined'){if (typeof __GWX_GLOBAL__==='undefined')global={};else global=__GWX_GLOBAL__;}if(typeof __WXML_GLOBAL__ === 'undefined') {__WXML_GLOBAL__={};
}__WXML_GLOBAL__.modules = __WXML_GLOBAL__.modules || {};
var e_={}
if(typeof(global.entrys)==='undefined')global.entrys={};e_=global.entrys;
var d_={}
if(typeof(global.defines)==='undefined')global.defines={};d_=global.defines;
var f_={}
if(typeof(global.modules)==='undefined')global.modules={};f_=global.modules || {};
var p_={}
__WXML_GLOBAL__.ops_cached = __WXML_GLOBAL__.ops_cached || {}
__WXML_GLOBAL__.ops_set = __WXML_GLOBAL__.ops_set || {};
__WXML_GLOBAL__.ops_init = __WXML_GLOBAL__.ops_init || {};
var z=__WXML_GLOBAL__.ops_set.$gwx_XC_23 || [];
function gz$gwx_XC_23_1(){
if( __WXML_GLOBAL__.ops_cached.$gwx_XC_23_1)return __WXML_GLOBAL__.ops_cached.$gwx_XC_23_1
__WXML_GLOBAL__.ops_cached.$gwx_XC_23_1=[];
(function(z){var a=11;function Z(ops){z.push(ops)}
Z([[7],[3,'animated']])
Z([1,true])
Z([[7],[3,'background']])
Z([[7],[3,'color']])
Z([[7],[3,'opacityNum']])
Z([[7],[3,'show']])
Z([[7],[3,'title']])
Z([[7],[3,'exhibition']])
Z([[2,'!'],[[7],[3,'exhibition']]])
Z([3,'detail_box'])
Z(z[1])
Z([3,'swiperChange'])
Z([1,500])
Z([1,3000])
Z([[2,'!='],[[7],[3,'video']],[1,'']])
Z([[2,'!='],[[6],[[7],[3,'detailMsg']],[3,'desc']],[1,'']])
Z([[2,'=='],[[7],[3,'mainboard_type']],[1,3]])
Z([[7],[3,'commentLists']])
Z([3,'index'])
Z([3,'#FA7B14'])
Z([[6],[[7],[3,'item']],[3,'score']])
Z([1,5])
Z([[8],'wxParseData',[[6],[[7],[3,'article']],[3,'nodes']]])
Z([3,'wxParse'])
Z([3,'detail_buy'])
Z([[2,'=='],[[6],[[7],[3,'detailMsg']],[3,'state']],[1,1]])
Z([[2,'=='],[[6],[[7],[3,'detailMsg']],[3,'state']],[1,2]])
Z([3,''])
Z([[2,'=='],[[7],[3,'special_type']],[[2,'-'],[1,1]]])
Z([[2,'&&'],[[2,'=='],[[7],[3,'is_buy']],[1,0]],[[2,'!'],[[6],[[7],[3,'detailMsg']],[3,'isOpen']]]])
Z([[2,'&&'],[[2,'=='],[[7],[3,'is_buy']],[1,1]],[[2,'!'],[[6],[[7],[3,'detailMsg']],[3,'isOpen']]]])
Z([[6],[[7],[3,'detailMsg']],[3,'isOpen']])
Z([[2,'=='],[[6],[[7],[3,'detailMsg']],[3,'state']],[1,3]])
Z([[7],[3,'is_line']])
Z([[7],[3,'check_show']])
})(__WXML_GLOBAL__.ops_cached.$gwx_XC_23_1);return __WXML_GLOBAL__.ops_cached.$gwx_XC_23_1
}
__WXML_GLOBAL__.ops_set.$gwx_XC_23=z;
__WXML_GLOBAL__.ops_init.$gwx_XC_23=true;
var x=['./pages/goodsDetail/goodsDetail.wxml','../../wxParse/wxParse.wxml'];d_[x[0]]={}
var m0=function(e,s,r,gg){
var z=gz$gwx_XC_23_1()
var l3D=e_[x[0]].i
_ai(l3D,x[1],e_,x[0],2,2)
var b7D=_mz(z,'navigation-bar',['animated',0,'back',1,'background',1,'color',2,'opacityNum',3,'show',4,'title',5],[],e,s,gg)
_(r,b7D)
var o8D=_n('page-loading')
_rz(z,o8D,'loading',7,e,s,gg)
_(r,o8D)
var a4D=_v()
_(r,a4D)
if(_oz(z,8,e,s,gg)){a4D.wxVkey=1
var x9D=_n('view')
_rz(z,x9D,'class',9,e,s,gg)
var cBE=_mz(z,'swiper',['autoplay',10,'bindchange',1,'duration',2,'interval',3],[],e,s,gg)
var hCE=_v()
_(cBE,hCE)
if(_oz(z,14,e,s,gg)){hCE.wxVkey=1
}
hCE.wxXCkey=1
_(x9D,cBE)
var o0D=_v()
_(x9D,o0D)
if(_oz(z,15,e,s,gg)){o0D.wxVkey=1
}
var fAE=_v()
_(x9D,fAE)
if(_oz(z,16,e,s,gg)){fAE.wxVkey=1
var oDE=_v()
_(fAE,oDE)
var cEE=function(lGE,oFE,aHE,gg){
var eJE=_mz(z,'tui-rate',['active',19,'current',1,'quantity',2],[],lGE,oFE,gg)
_(aHE,eJE)
return aHE
}
oDE.wxXCkey=4
_2z(z,17,cEE,e,s,gg,oDE,'item','index','index')
}
var bKE=_v()
_(x9D,bKE)
var oLE=_oz(z,23,e,s,gg)
var xME=_gd(x[0],oLE,e_,d_)
if(xME){
var oNE=_1z(z,22,e,s,gg) || {}
var cur_globalf=gg.f
bKE.wxXCkey=3
xME(oNE,oNE,bKE,gg)
gg.f=cur_globalf
}
else _w(oLE,x[0],5,2498)
var fOE=_n('view')
_rz(z,fOE,'class',24,e,s,gg)
var cPE=_v()
_(fOE,cPE)
if(_oz(z,25,e,s,gg)){cPE.wxVkey=1
}
var hQE=_v()
_(fOE,hQE)
if(_oz(z,26,e,s,gg)){hQE.wxVkey=1
var cSE=_n('view')
_rz(z,cSE,'class',27,e,s,gg)
var oTE=_v()
_(cSE,oTE)
if(_oz(z,28,e,s,gg)){oTE.wxVkey=1
}
else{oTE.wxVkey=2
var lUE=_v()
_(oTE,lUE)
if(_oz(z,29,e,s,gg)){lUE.wxVkey=1
}
var aVE=_v()
_(oTE,aVE)
if(_oz(z,30,e,s,gg)){aVE.wxVkey=1
}
var tWE=_v()
_(oTE,tWE)
if(_oz(z,31,e,s,gg)){tWE.wxVkey=1
}
lUE.wxXCkey=1
aVE.wxXCkey=1
tWE.wxXCkey=1
}
oTE.wxXCkey=1
_(hQE,cSE)
}
var oRE=_v()
_(fOE,oRE)
if(_oz(z,32,e,s,gg)){oRE.wxVkey=1
}
cPE.wxXCkey=1
hQE.wxXCkey=1
oRE.wxXCkey=1
_(x9D,fOE)
o0D.wxXCkey=1
fAE.wxXCkey=1
fAE.wxXCkey=3
_(a4D,x9D)
}
var t5D=_v()
_(r,t5D)
if(_oz(z,33,e,s,gg)){t5D.wxVkey=1
}
var e6D=_v()
_(r,e6D)
if(_oz(z,34,e,s,gg)){e6D.wxVkey=1
}
a4D.wxXCkey=1
a4D.wxXCkey=3
t5D.wxXCkey=1
e6D.wxXCkey=1
l3D.pop()
return r
}
e_[x[0]]=e_[x[0]]||{f:m0,j:[],i:[],ti:[x[1]],ic:[]}
if(path&&e_[path]){
return function(env,dd,global){$gwxc=0;var root={"tag":"wx-page"};root.children=[]
;g="$gwx_XC_23";var main=e_[path].f
if (typeof global==="undefined")global={};global.f=$gdc(f_[path],"",1);
try{
main(env,{},root,global);
_tsd(root)
}catch(err){
console.log(err)
}
;g="";
return root;
}
}
}
}(__g.a,__g.b,__g.c,__g.d,__g.e,__g.f,__g.g,__g.h,__g.i,__g.j,__g.k,__g.l,__g.m,__g.n,__g.o,__g.p,__g.q,__g.r,__g.s,__g.t,__g.u,__g.v,__g.w,__g.x,__g.y,__g.z,__g.A,__g.B,__g.C,__g.D,__g.E,__g.F,__g.G,__g.H,__g.I,__g.J,__g.K,__g.L,__g.M,__g.N,__g.O,__g.P,__g.Q,__g.R,__g.S,__g.T,__g.U,__g.V,__g.W,__g.X,__g.Y,__g.Z,__g.aa);if(__vd_version_info__.delayedGwx||false)$gwx_XC_23();	if (__vd_version_info__.delayedGwx) __wxAppCode__['pages/goodsDetail/goodsDetail.wxml'] = [$gwx_XC_23, './pages/goodsDetail/goodsDetail.wxml'];else __wxAppCode__['pages/goodsDetail/goodsDetail.wxml'] = $gwx_XC_23( './pages/goodsDetail/goodsDetail.wxml' );
	;__wxRoute = "pages/goodsDetail/goodsDetail";__wxRouteBegin = true;__wxAppCurrentFile__="pages/goodsDetail/goodsDetail.js";define("pages/goodsDetail/goodsDetail.js",function(require,module,exports,window,document,frames,self,location,navigator,localStorage,history,Caches,screen,alert,confirm,prompt,XMLHttpRequest,WebSocket,Reporter,webkit,WeixinJSCore){
"use strict";var e=require("../../@babel/runtime/helpers/interopRequireDefault"),a=require("../../@babel/runtime/helpers/objectSpread2"),t=require("../../@babel/runtime/helpers/readOnlyError"),r=e(require("../../@babel/runtime/regenerator")),i=require("../../@babel/runtime/helpers/asyncToGenerator"),n=require("../../@babel/runtime/helpers/toConsumableArray"),s=require("../../request/api"),o=getApp(),d=require("../../utils/util.js"),c=require("../../wxParse/wxParse.js"),u=1,l="",g=!1,f="",p="",h=null,_=null,y=!1;Page({data:{title:"商品详情",color:"#000000",background:"#FFFFFF",show:!0,animated:!1,exhibition:!0,opacityNum:1,inDots:0,id:"",device_id:"",door_number:"",mainboard_type:"",detailMsg:"",video:"",special_type:-1,is_buy:0,card_id:"",union_id:"",sessionKey:"",allMsg:"",check_show:!1,check_times:20,electric_pop:!1,electric_num:"",deviceItem:{},deviceId:"",userMsg:"",connectStatus:"",signflow:!1,sys_encrypt_data:null,commentLists:null,commentListsNum:null},onLoad:function(e){var a=e.id,t=e.device_id,r=e.num,i=e.special_type,n=e.is_buy;if(wx.setStorageSync("isPreview",0),wx.setStorageSync("isBackRefresh",!1),d.isExitsVariable(a)){var s=wx.getStorageSync("mainboard_type")||1;i=Number(i)||-1,this.setData({id:a,device_id:t,door_number:r,special_type:i,is_buy:n||0,mainboard_type:s})}},onReady:function(){_=wx.createVideoContext("myVideo")},onShow:function(){if(o.globalData.isPreviewApi)o.globalData.isPreviewApi=!1;else{var e=this.data.mainboard_type;if(1!=(wx.getStorageSync("isPreview")||0))if(this.getDetails(),this.getUserConfig(),-1!=this.data.special_type){var a=wx.getStorageSync("union_id")||"";""==a&&this.getUserSessionKey(),this.setData({union_id:a})}3==e&&o.reconnectBlue()}},onUnload:function(){wx.setStorageSync("isPreview",0),clearInterval(h),clearInterval(f)},onPullDownRefresh:function(){this.getDetails()},onPageScroll:function(e){var a=1-e.scrollTop/100;this.setData({opacityNum:a<=100?a:0}),this.showImg(e.scrollTop)},swiperChange:function(e){this.setData({inDots:e.detail.current}),0!=e.detail.current&&_.pause()},showImg:function(e){l||wx.createSelectorQuery().select("#goodsImg").boundingClientRect((function(e){l=e.width})).exec(),c.scrollFun(e,l)},previewImg:function(e){var a=e.currentTarget.dataset.url,t=e.currentTarget.dataset.urls||a;wx.previewImage({urls:n(t),current:a,success:function(e){wx.setStorageSync("isPreview",1)},fail:function(e){o.showToast("预览失败")}})},getUserConfig:function(){var e=this;o.ajax({url:"User/User/getUserConfig",data:{},success:function(a){1e3==a.data.code&&e.setData({can_getuserinfo:a.data.data.can_getuserinfo,can_refuse_getuserinfo:a.data.data.can_refuse_getuserinfo})}})},getDetails:function(){var e,a=this,t=this.data,n={id:t.id,device_id:t.device_id,door_number:t.door_number};o.ajax({url:"User/Shop/details",data:n,success:(e=i(r.default.mark((function e(t){var i,n,s,d,l,g,f;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 1e3==t.data.code?(i=t.data.data,n=i.details,s=i.video,d=i.card_id,l=a.data,g=l.special_type,f=l.is_buy,c.wxParse("article","html",n,a,5),wx.setStorageSync("isPreview",0),a.setData({detailMsg:t.data.data,video:s}),0==(u=t.data.data.device_line)&&wx.setStorageSync("canLoad",!0),-1!=g&&(a.setData({card_id:d}),1==f?a.getOpenCardConfig(d):a.getCardConfig(d))):o.showToast(t.data.msg),wx.stopPullDownRefresh(),e.next=4,a.getCommentLists();case 4:a.setData({exhibition:!1});case 5:case"end":return e.stop()}}),e)}))),function(a){return e.apply(this,arguments)})})},getCommentLists:function(){var e=this;return i(r.default.mark((function a(){var i,n,o,d,c;return r.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=e.data.detailMsg,n={product_id:i.id,page:1,row:2},a.next=4,(0,s.getCommentLists)(n);case 4:o=a.sent,d=o.data,(c=o.count)>99999&&t("count"),e.setData({commentLists:d,commentListsNum:c,isLoading:!1});case 9:case"end":return a.stop()}}),a)})))()},previewImage:function(e){var a=this.data.commentLists,t=e.currentTarget.dataset,r=t.index,i=t.src,n=a[r].images.map((function(e){return e.resource_url}));wx.previewImage({current:i,urls:n})},skipAllEvaluate:function(){var e=this.data.detailMsg;wx.navigateTo({url:"/pages/comment/commentList/commentList?product_id="+e.id})},getUserProfile:function(){var e=this,a=this.data.can_refuse_getuserinfo;y||(y=!0,/true/.test(a)?(this.buyFun(),y=!1):wx.getUserProfile?wx.getUserProfile({desc:"用于完善会员资料",success:function(a){console.log(a),e.setData({userMsg:a.userInfo}),e.editUserInfoApi(a.userInfo),y=!1},fail:function(a){e.buyFun(),y=!1}}):wx.getUserInfo({success:function(a){e.setData({userMsg:a.userInfo}),e.editUserInfoApi(a.userInfo),y=!1},fail:function(){o.showToast("为了您能更好体验小程序,请先授权用户信息"),e.buyFun(),y=!1}}))},editUserInfoApi:function(e){var a=this,t=this.data.device_id,r=e.nickName,i=e.avatarUrl,n=e.gender,s=e.country,d=e.province,c=e.city;o.ajax({url:"User/User/editUser",data:{name:r,url:i,gender:n,country:s,province:d,city:c,is_auth:1,device_id:t},success:function(e){1e3==e.data.code?(a.buyFun(),a.setData({can_getuserinfo:!1})):o.showToast(e.data.message)}})},getOrderDetial:function(){var e=this,a=this.data.device_id,t={order_id:p,time:Math.random()},r=d.encryption(JSON.stringify(t));this.setData({sys_encrypt_data:r}),o.ajax({url:"User/Order/orderDetails",data:{sys_encrypt_data:r},success:function(t){if(1e3==t.data.code){var i=t.data,n=i.data,s=i.sign_data;if(!s)return;var o=JSON.parse(JSON.stringify(s)),c=d.checkSign(n,s,s.sign),u=a==n.device_id,l=r==o.sys_encrypt_data;u&&l&&c&&(clearInterval(h),e.sendOpenCode())}}})},queryOrder:function(){var e=this;h=setInterval((function(){e.getOrderDetial()}),1e3)},buyFun:function(){if(3==this.data.mainboard_type){var e=o.globalData.blue.checkRoot().blueRoot,a=wx.getStorageSync("bluestatus"),t=wx.getStorageSync("connectStatus");a?e||t||!a?!t&&a?o.showToast("蓝牙未连接"):this.confirmOrder():o.showToast("你已关闭了蓝牙,请打开~"):o.showToast("未连接设备")}else this.showCheck()},confirmOrder:function(e){var a=this.data,t=a.id,r=a.device_id,i=a.door_number;if(0==u)return this.setData({is_line:!0}),!1;this.setData({userKey:e}),this.greadOrderFun(t,r,i)},greadOrderFun:function(e,a,t){var r=this,i=this.data,n=i.special_type;i.mainboard_type;g||(g=!0,wx.showLoading({title:"调起支付中...",make:!0}),o.ajax({url:"User/Order/order",data:{id:e,pay_way:1,order_type:-1==n?1:3,device_id:a,door_number:-1==n?t:0},success:function(e){if(1e3==e.data.code){r.setData({allMsg:e.data.data}),p=e.data.data.order_id;var a=e.data,t=a.data,i=a.sign_data,n=d.checkSign(t,i,i.sign);r.setData({signflow:n}),r.openArking()}else wx.setStorageSync("canLoad",!0),o.showToast(e.data.msg),g=!1}}))},openArking:function(){var e=this,a=this.data,t=a.allMsg,r=a.special_type,i=a.mainboard_type,n=a.userKey;o.ajax({url:"User/Order/comfirmPay",data:{order_id:p},success:function(a){1e3==a.data.code?3==t.payment_mode?e.payByOther():e.payByFun():1100==a.data.code?(wx.setStorageSync("canLoad",!0),wx.setStorageSync("can_query",!0),g=!1,-1==r?3!=i?wx.redirectTo({url:"../openArking/openArking?o_backs=true&order_id="+p}):e.sendOpenCode():(e.setData({is_buy:1}),e.addCardUserInfo(n))):(g=!1,o.showToast(a.data.msg)),wx.hideLoading()}})},payByOther:function(){var e=this.data.allMsg,a=e.appId,t=e.path,r=e.envVersion,i=e.orderDesc,n=e.tradeAmount,s=e.merchOrderNo,o=e.notifyUrl,d=e.device_model,c={orderDesc:i,tradeAmount:n,merchOrderNo:s,notifyUrl:o},u=this.data,l=u.device_id,f=u.door_number;wx.navigateToMiniProgram({appId:a,path:t,extraData:c,envVersion:r,success:function(e){wx.setStorageSync("canLoad",!0),wx.setStorageSync("can_query",!0),g=!1,wx.redirectTo({url:"../payLoading/payLoading?model="+d+"&device_id="+l+"&openBox="+f+"&o_backs=true&order_id="+p})}})},payByFun:function(){var e=this,t=this.data,r=t.allMsg,i=t.mainboard_type,n=t.special_type,s=t.userKey,d=t.signflow;3==i&&d&&(clearInterval(h),this.queryOrder()),o.globalData.isPreviewApi=!0,wx.requestPayment(a(a({},r),{},{success:function(a){wx.setStorageSync("canLoad",!0),wx.setStorageSync("can_query",!0),g=!1,-1==n?3!=i&&wx.redirectTo({url:"../openArking/openArking?o_backs=true&order_id="+p}):(e.setData({is_buy:1}),e.addCardUserInfo(s))},fail:function(e){3==i&&clearInterval(h),g=!1,o.showToast("支付失败")}}))},sendOpenCode:function(){var e=this;return i(r.default.mark((function a(){var t,i;return r.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(console.log("下发了sendOpenCode"),t=e.data.door_number,i=o.globalData.blue,wx.getStorageSync("connectStatus")){a.next=7;break}return e.blueJump(0),a.abrupt("return");case 7:return a.next=9,i.send(t);case 9:a.sent?e.blueJump(1):e.blueJump(0);case 11:case"end":return a.stop()}}),a)})))()},blueJump:function(e){var a=this.data,t=a.mainboard_type,r=a.door_number,i=a.detailMsg;1==e&&this.bluetoothCallOpenDoor(),wx.redirectTo({url:"../openArking/openArking?o_backs=true&order_id="+p+"&blue_res="+e+"&mainboard_type="+t+"&openBox="+r+"&model="+i.device_model})},bluetoothCallOpenDoor:function(){o.ajax({url:"User/Order/bluetoothCallOpenDoor",data:{order_id:p,type:1},success:function(e){}})},showCheck:function(){var e=this;clearInterval(f),this.setData({check_show:!0,check_times:20}),o.ajax({url:"User/Order/openDoorCheck",data:{device_id:this.data.device_id},success:function(e){}}),f=setInterval((function(){var a=e.data.check_times;a<=0?(clearInterval(f),e.closeCheck(),e.setData({is_line:!0})):(a--,e.setData({check_times:a}),e.checkOnline())}),1e3)},closeCheck:function(){this.setData({check_show:!1}),clearInterval(f)},checkOnline:function(){var e=this;o.ajax({url:"User/Order/getDoorCheck",data:{device_id:this.data.device_id},success:function(a){1e3==a.data.code&&1==a.data.data.status&&(clearInterval(f),e.closeCheck(),e.confirmOrder())}})},closeOline:function(){this.setData({is_line:!1})},getUserSessionKey:function(){var e=this;wx.login({success:function(a){o.ajax({url:"admin/api.card.index/getUserInfo",data:{code:a.code},success:function(a){0==a.data.code&&e.setData({sessionKey:a.data.data.session_key})}})}})},getOpenCardConfig:function(e){var a=this;o.ajax({url:"admin/api.card.index/getUserCardInfo",data:{openid:wx.getStorageSync("openid"),card_id:e},success:function(t){if(0==t.data.code){var r=a.data.detailMsg;r.isOpen=!0,r.card_code=t.data.data.code,a.setData({detailMsg:r})}else a.getCardConfig(e)}})},getCardConfig:function(e){var a=this;o.ajax({url:"admin/api.card.index/cardExt",data:{openid:wx.getStorageSync("openid"),card_id:e},success:function(e){var t=a.data.detailMsg,r=e.data;t.cardExt=r,a.setData({detailMsg:t})}})},addCardUserInfo:function(e){var a=this,t=e.detail,r=t.encryptedData,i=t.iv,n=this.data,s=n.sessionKey,d=n.union_id,c=n.detailMsg,u=n.card_id,l=JSON.stringify(c.cardExt);wx.addCard({cardList:[{cardId:u,cardExt:l}],success:function(e){var t=e.cardList,n=t[0].code;t[0].isSuccess||o.showToast("开卡失败"),wx.setStorageSync("canLoad",!0),d?a.saveCardInfo(u,d,n):a.getDecryptUnionid(r,i,s,n,u)},fail:function(e){a.getCardConfig(u),o.showToast("开卡失败，请重试！")}})},getDecryptUnionid:function(e,a,t,r,i){var n=this;o.ajax({url:"admin/api.card.index/getDecryptUnionid",data:{encryptedData:e,iv:a,sessionKey:t,code:r},success:function(e){if(0==e.data.code){var a=JSON.parse(e.data.data).unionId;n.setData({union_id:a}),wx.setStorageSync("union_id",a),n.saveCardInfo(i,a,r)}else o.showToast(e.data.msg)}})},saveCardInfo:function(e,a,t){var r=this,i=wx.getStorageSync("openid");o.ajax({url:"admin/api.card.index/saveCardInfo",data:{openid:i,card_id:e,unionid:a,code:t},success:function(e){o.showToast(e.data.msg),0==e.data.code&&(r.setData({is_buy:1}),r.getDetails())}})},openCard:function(e){var a=e.currentTarget.dataset,t=a.card_id,r=a.card_code;wx.openCard({cardList:[{cardId:t,code:r}],success:function(e){},fail:function(e){}})}});
},{isPage:true,isComponent:true,currentFile:'pages/goodsDetail/goodsDetail.js'});require("pages/goodsDetail/goodsDetail.js");